package com.nannybear.Communication;

/**
 * \brief Communication protocol
 * \author Audrey LOISEAU
 * \date 30-03-2015
 */

/********************************* COPYRIGHT *********************************
 * Copyright (c) 2015, Audrey LOISEAU and Benjamin LANCINOT.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice, this
 *    list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *************************************************************************************/

class Protocol {
    /********** DECLARATIONS **********/
    // (Reception) Value of the temperature
    public static final int TEMP_VALUE = 0;

    // (Reception) State of the light
    public static final int LIGHT_STATE = 1;

    // (Reception) Value of the humidity
    public static final int HUM_VALUE = 2;

    // (Reception) State of the baby
    public static final int BABY_STATE = 3;

    // (Reception) Humidity threshold
    public static final int HUM_THRESHOLD = 4;

    // (Reception) Temperature threshold
    public static final int TEMP_THRESHOLD = 5;

    // (Reception) Average temperature
    public static final int TEMP_AVERAGE = 6;

    // (Reception) Average humidity
    public static final int HUM_AVERAGE = 7;

    // (Reception) Modification of light threshold by another user (between dark and dim)
    public static final int LIGHT_THRESHOLD_DARK_DIM_CHANGED = 8;

    // (Reception) Modification of light threshold by another user (between dim and bright)
    public static final int LIGHT_THRESHOLD_DIM_BRIGHT_CHANGED = 9;

    // (Reception) Modification of sound threshold by another user
    public static final int SOUND_THRESHOLD_CHANGED = 10;

    // (Reception) Reset of temperature graph by another user
    public static final int RESET_TEMP_ASKED = 11;

    // (Reception) Reset of humidity graph by another user
    public static final int RESET_HUM_ASKED = 12;




    // (Emission) New threshold of the light (between dark and dim)
    public static final int LIGHT_THRESHOLD_DARK_DIM = 0;

    // (Emission) New threshold of the light (between dim and bright)
    public static final int LIGHT_THRESHOLD_DIM_BRIGHT = 1;

    // (Emission) New threshold of the sound
    public static final int SOUND_THRESHOLD = 2;

    // (Emission) Ask the reset of the average temperature
    public static final int RESET_TEMP = 3;

    // (Emission) Ask the reset of the average humidity
    public static final int RESET_HUM = 4;

    // (Emission) Change the state of the night light
    public static final int NIGHT_LIGHT_STATE = 5;

    // (Emission) Send the choice of LED to lights on/off
    public static final int SELECTED_LED = 6;

    // (Emission) Send the choice of animation for the night light
    public static final int LED_ANIMATION = 7;

    // (Emission) Send the start or switch of lullaby music
    public static final int LULLABY = 8;

    /************ METHODS ************/
    /**
     * Constructor (empty)
     */
    private Protocol(){
    }
}
